*::after, *::before {
  box-sizing: border-box;
}

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 100vh;
  background: #222;
  overflow: hidden;
}


.scroll {
  position: relative;
  display: flex;
  width: 700px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #fff 20%, #fff 80%, transparent);
}

.scroll div {
  white-space: nowrap;
  animation: animate var(--t) linear infinite;
  animation-delay: calc(var(--t) / -1);
}

@keyframes animate {
  0% {
    transform: translateX(100%);
  } 
  100% {
    transform: translateX(-100%);
  }
}

.scroll div span {
  display: inline-flex;
  margin: 10px;
  background: #333;
  color: #FFF;
  padding: 5px 10px;
  border-radius: 5px;
  transition: .5s;
  letter-spacing: .2em;
}

.scroll div span:hover {
  background: #4caf50;
  cursor: pointer;
}

.scroll div:nth-child(2) {
  animation: animate2 var(--t) linear infinite;
  animation-delay: calc(var(--t) / -2);
}

@keyframes  animate2 {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-200%);
  }
}